package com.zxp.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.zxp.model.User;
import com.zxp.service.UserService;
import org.apache.dubbo.config.annotation.DubboService;

import java.lang.management.ManagementFactory;

/**
 * @author zxp
 * @date 2021-08-24 16:19
 */
@DubboService
public class UserServiceImpl implements UserService {

    @Override
    public User findUserById(Integer id) {
        User user = new User();
        user.setId(id);
        user.setUsername("名称："+ ManagementFactory.getRuntimeMXBean().getName());
        return user;
    }
}
